<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head th:replace="commons/header :: #head(title='首页')"></head>
	<style>
		a{
			background-color: rgba(0,0,0,0) !important;
		}
		.sidebar-icon{
			background-color: white !important;
		}
	</style>
	<script>
		$(function () {
            onLoadIframe();

        })
        function test(obj) {
            $("#main").attr("src",$(obj).find("input").val());
            onLoadIframe();
        }
        // 计算页面的实际高度，iframe自适应会用到
        function calcPageHeight(doc) {
            var cHeight = Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
            var sHeight = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight)
            var height  = Math.max(cHeight, sHeight)
            return height
        }
        //根据ID获取iframe对象
		function onLoadIframe() {

            var ifr = document.getElementById('main')
            //解决打开高度太高的页面后再打开高度较小页面滚动条不收缩
            ifr.style.height='0px';
            var iDoc = ifr.contentDocument || ifr.document
            var height = calcPageHeight(iDoc)
            if(height < 850){
                height = 850;
            }
            ifr.style.height = height + 'px'
        }


	</script>

	<body>
	   <div class="page-container">
		   <!--/content-inner-->
		   <div class="left-content">
		   <div class="mother-grid-inner">
			   <!--顶部导航-->
			   <div th:replace="commons/bar :: topbar"></div>
			   <!--左侧菜单栏开始-->
			   <div class="sidebar-menu" th:fragment="leftMenu">
				   <header class="logo1">
					   <a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span> </a>
				   </header>
				   <div style="border-top:1px ridge rgba(255, 255, 255, 0.15)"></div>
				   <div id="cmsMenu">
					   <div class="menu">
						   <ul id="menu">
							   <li th:each="items : ${cmsMenuList}" onclick="test(this)">
								   <input type="hidden" class="url" th:value="@{${items.url}}"/>
								   <a href="javascript:void(0);" class="test">

									   <!--<i class="fa fa-tachometer"></i>--> <span v-text="items.cmname"></span>
									   [[${items.cmname}]]<span th:if="${#lists.size(items.cmsMenuList)}" class="fa fa-angle-right" style="float: right"></span>
									   <div class="clearfix"></div>
								   </a>
								   <!--对顶部导航的操作一级导航不可删除和添加只能微调-->
								   <ul id="menu-academico-sub" >
									   <li id="menu-academico-avaliacoes" th:each="subItems : ${items.cmsMenuList}" onclick="test(this)">
										   <input type="hidden" class="url" th:value="@{${subItems.url}}"/>
										   <a href="javascript:void(0);" th:text="${subItems.cmname}">

										   </a></li>
								   </ul>
							   </li>
						   </ul>
					   </div>
				   </div>
			   </div>
			   <!--左侧菜单栏结束-->
				<!--<ol class="breadcrumb">-->
					<!--<li class="breadcrumb-item"><a href="main.html">Home</a> <i class="fa fa-angle-right"></i></li>-->
				<!--</ol>-->
			   <div class="main_page">
				   <iframe scrolling="no" id="main" name="main" frameborder="0" src="/icons"  style="min-height:600px;width:100%;height:100%;"></iframe>
			   </div>


			   <!---->


			   <!---->
	<!-- script-for sticky-nav -->
			<script>
			$(document).ready(function() {
				 var navoffeset=$(".header-main").offset().top;
				 $(window).scroll(function(){
					var scrollpos=$(window).scrollTop();
					if(scrollpos >=navoffeset){
						$(".header-main").addClass("fixed");
					}else{
						$(".header-main").removeClass("fixed");
					}
				 });

			});
			</script>
			<!-- /script-for sticky-nav -->
	<!--inner block start here-->
	<div class="inner-block">

	</div>
	<!--inner block end here-->
	<!--copy rights start here-->
	<div class="copyrights">
		 <p>Copyright &copy; 2016.Company name All rights reserved.More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></p>
	</div>
	<!--COPY rights end here-->
	</div>
	</div>
	  <!--//content-inner-->
				<!--/sidebar-menu-->

								  <div class="clearfix"></div>
								</div>
								<script>
								var toggle = true;

								$(".sidebar-icon").click(function() {
								  if (toggle)
								  {
									$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
									$("#menu span").css({"position":"absolute"});
								  }
								  else
								  {
									$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
									setTimeout(function() {
									  $("#menu span").css({"position":"relative"});
									}, 400);
								  }

												toggle = !toggle;
											});
								</script>
	<!--js -->
	<script src="js/jquery.nicescroll.js"></script>
	<script src="js/scripts.js"></script>
	<!-- Bootstrap Core JavaScript -->
	   <script src="js/bootstrap.min.js"></script>
	   <!-- /Bootstrap Core JavaScript -->
	<!-- morris JavaScript -->
	<script src="js/raphael-min.js"></script>
	<script src="js/morris.js"></script>
	<script>
		$(document).ready(function() {
			//BOX BUTTON SHOW AND CLOSE
		   jQuery('.small-graph-box').hover(function() {
			  jQuery(this).find('.box-button').fadeIn('fast');
		   }, function() {
			  jQuery(this).find('.box-button').fadeOut('fast');
		   });
		   jQuery('.small-graph-box .box-close').click(function() {
			  jQuery(this).closest('.small-graph-box').fadeOut(200);
			  return false;
		   });

			//CHARTS
			function gd(year, day, month) {
				return new Date(year, month - 1, day).getTime();
			}

			graphArea2 = Morris.Area({
				element: 'hero-area',
				padding: 10,
			behaveLikeLine: true,
			gridEnabled: false,
			gridLineColor: '#dddddd',
			axes: true,
			resize: true,
			smooth:true,
			pointSize: 0,
			lineWidth: 0,
			fillOpacity:0.85,
				data: [
					{period: '2014 Q1', iphone: 2668, ipad: null, itouch: 2649},
					{period: '2014 Q2', iphone: 15780, ipad: 13799, itouch: 12051},
					{period: '2014 Q3', iphone: 12920, ipad: 10975, itouch: 9910},
					{period: '2014 Q4', iphone: 8770, ipad: 6600, itouch: 6695},
					{period: '2015 Q1', iphone: 10820, ipad: 10924, itouch: 12300},
					{period: '2015 Q2', iphone: 9680, ipad: 9010, itouch: 7891},
					{period: '2015 Q3', iphone: 4830, ipad: 3805, itouch: 1598},
					{period: '2015 Q4', iphone: 15083, ipad: 8977, itouch: 5185},
					{period: '2016 Q1', iphone: 10697, ipad: 4470, itouch: 2038},
					{period: '2016 Q2', iphone: 8442, ipad: 5723, itouch: 1801}
				],
				lineColors:['#ff4a43','#a2d200','#22beef'],
				xkey: 'period',
				redraw: true,
				ykeys: ['iphone', 'ipad', 'itouch'],
				labels: ['All Visitors', 'Returning Visitors', 'Unique Visitors'],
				pointSize: 2,
				hideHover: 'auto',
				resize: true
			});


		});
		</script>
	</body>
</html>